package com.yq.canalkafka.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author by shizan
 * @Classname PropsConfig
 * @Description TODO
 * @Date 2020/11/23 4:01 下午
 */
@Component
@Getter
public class PropsConfig {
    /**
     * 消费组Id，同一条消息一个组内只有一个消费者会消费
     */
    @Value("${spring.kafka.consumer.properties.group-id}")
    private String groupId;
    /**
     * kafka地址
     */
    @Value("${spring.kafka.bootstrap-servers}")
    private String servers;
    /**
     * 设置是否自动提交-false
     */
    @Value("${spring.kafka.consumer.enable-auto-commit}")
    private Boolean enableAutoCommit;
    /**
     * Set the max time to block in the consumer waiting for records
     */
    @Value("${spring.kafka.consumer.properties.pollTimeout}")
    private Integer pollTimeout;
    @Value("${spring.kafka.consumer.client-id}")
    private String clientId;


}
